home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10315 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.5 KB  |  49 lines

  1. Path: solon.com!not-for-mail
  2. From: Richard Wells <rdwells@mmm.com>
  3. Newsgroups: comp.lang.c,comp.lang.c.moderated,hp.unix,comp.sys.hp.apps,comp.sys.hp.hpux
  4. Subject: Re: C coding problem
  5. Date: 16 Mar 1996 12:51:19 -0600
  6. Organization: 3M Company
  7. Sender: clc@solutions.solon.com
  8. Approved: clc@solutions.solon.com
  9. Message-ID: <4if2j7$c7e@solutions.solon.com>
  10. References: <4ianbf$h86@solutions.solon.com>
  11. NNTP-Posting-Host: solutions.solon.com
  12. X-Mailer: Mozilla 2.0 (WinNT; I)
  13.  
  14. Stephen Proctor wrote:
  15.  > 1.) The following is the compilation line and the resulting warning message,
  16.  > 
  17.  > % c89 shell.c -o shell
  18.  > cc: "shell.c", line 98: warning 608: Illegal integer-pointer
  19.  > combination in assignment.
  20.  > 
  21.  > 2.) The program is as follows,
  22.  > 
  23.  > #include <stdio.h>
  24.  > #include <ctype.h>
  25.  > #include <string.h>
  26.  > #include <stdlib.h>
  27.  > 
  28.  > main(int argc, char *argv[])
  29.  > {
  30.  > int ii;
  31.  > int option_val = 0;
  32.  > /* skip lines */
  33.  > for (ii=1; ii<argc; ii++) {
  34.  > /* skip lines */
  35.  > /* The next line is the offending line */
  36.  >    if (*argv[ii] == '-') option_val = read_options;
  37.  > /* skip lines */
  38.  > return 0;         /* Program executed successfully */
  39.  > }
  40.  
  41. It would help if you could reduce this to a minimal sample of
  42. compilable code that would reproduce the warning.  This is
  43. obviously not it, since (1) the error occurs on line 98 and
  44. there are only about 20 lines of code here, and (2) you have
  45. no definition of read_options.
  46.  
  47. In fact, I suspect that the problem lies with the type
  48. of read_options.
  49.